If the image to load is a DIB or BMP, setting the hDIB property (or the hDIB64 Property for 64-bit environments) loads the image. If the image is a BMP, a call to hDIB converts the bitmap to a DIB and stores at hDIB.
The image can be accessed as a device dependent bitmap by calling ToHBitmap.
Note that ToHBitmap does not load an image. When ToHBitmap is called, the current DIB is converted to a device dependent bitmap and stored at ToHBitmap. Therefore, the value of ToHBitmap may change in subsequent calls, if the DIB has been modified. |
The OwnDIB property specifies whether ImagXpress® should make a copy of the DIB during loading, or use the source DIB at the source location.
- If the OwnDIB property is False, when loading a DIB using hDIB, then ImagXpress stores a copy of the source DIB at a new location and assigns hDIB to this location. Processing of the loaded DIB will not result in modifications in the source DIB.
-
If the OwnDIB property is True, when loading a DIB using hDIB, then ImagXpress stores the source DIB handle in the ImagXpress buffer and subsequent processing of the image results in modification of the source DIB.
Note that when a DIB loads by setting hDIB, the display is not immediately updated. The display will update to the new DIB the next time the display paints. |